package com.ideabove.custom;

import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.EditText;

public class MyEditText extends EditText {

	public MyEditText(Context a_context) {		
		super(a_context);
	}
	
	public MyEditText(Context a_context, AttributeSet a_attributeSet) {		
		super(a_context, a_attributeSet);		
	}
	
	// back 키를 막아라
	public boolean onKeyPreIme(int keyCode, KeyEvent event) {

		if(event.getAction() == KeyEvent.ACTION_DOWN) {
			
			if(keyCode == KeyEvent.KEYCODE_BACK) {				
				this.clearFocus();
			}
      }
		return super.onKeyPreIme(keyCode, event); // 시스템 default 함수 사용
	}	
}



